/**
 * Created by Amaris on 2016/12/6.
 */

var express = require('express');
var router = express.Router();
var teleConferenceCtrl = require('../../controller/controller.teleconference.js');

router.get('/getTeleConferenceInfo', function (req, res, next) {
    teleConferenceCtrl.getInfo(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});

router.post('/createTeleConference', function (req, res, next) {
    teleConferenceCtrl.create(req.body, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});


router.post('/updateTeleConference', function (req, res, next) {
    teleConferenceCtrl.update(req.body, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});
router.get('/getTeleConferenceList', function (req, res, next) {
    teleConferenceCtrl.getList(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});

router.get('/getListByTeamId', function (req, res, next) {
    teleConferenceCtrl.getListByTeamId(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});

router.get('/deleTeleConference',function(req,res,next){
    teleConferenceCtrl.delete(req.query,function(err,result){
        if (err) throw err;
        res.send(result);
    });
});


module.exports = router;
